package domain.service.event;

import domain.dao.event.EventMessageInfoDao;
import domain.entity.event.EventMessageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by bowen on 2017-08-17.
 */
@Service
public class EventMessageInfoService {

    @Autowired
    private EventMessageInfoDao infoDao;

    public void create(EventMessageInfo messageInfo) {
        infoDao.create(messageInfo);
    }

    public int getTotalUnread(long eventId,String userId){
        return infoDao.getTotalUnread(eventId,userId);
    }

    public int getMyTotalUnread(String userId){
       return infoDao.getMyTotalUnread(userId);
    }

    public int getAtTotalUnread(String userId){
        return infoDao.getAtTotalUnread(userId);
    }

    public int getPublicTotalUnread(String userId){
        return infoDao.getPublicTotalUnread(userId);
    }

}
